import * as PIXI from 'pixi.js'
import useMainStore from '@/store/modules/useMainStore'

export default async function (): Promise<{
  scale: number
  cbWidth: number
  textureSource: PIXI.TextureSource
}> {
  const mainStore = useMainStore()
  await mainStore.getApp()
  const bundle = await PIXI.Assets.loadBundle('cardBook')
  const textureSource = new PIXI.Texture(bundle.cardBook).source // 创建纹理
  return {
    ...mainStore.getAppAttr,
    textureSource,
  }
}
